package com.xafc.demo.security.entity;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * @Author: ZhangMing
 * @Date: 2021/4/16 13:47
 */
public class UserDetailEntity extends User {
    private Integer id;
    private String salt;
    private Integer status;

    public UserDetailEntity(String username, String password,
                            Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
    }

    public UserDetailEntity(String username, String password, boolean enabled,
                            boolean accountNonExpired, boolean credentialsNonExpired,
                            boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
}
